package edu.kit.csl.cratylus.io;

import java.io.IOException;

import edu.kit.csl.cratylus.datatypes.Corpus;
import edu.kit.csl.cratylus.extraction.WritingSystem;

/**
 * This interface is used for different methods to write the corpus to the file
 * system. The corpus include all information stored in a {@link Corpus}
 * instance, i.e. all sentence pairs with their alignments on word level.
 */
public interface CorpusDumper {
	
	/**
	 * Writes a corpus to the file system. The writing system is used to
	 * convert the phoneme strings on the target language side to proper
	 * written words.
	 * 
	 * @param corpus the corpus to dump
	 * @param ws the writing system to use
	 * @param fileName the path to the file to write
	 * @throws NullPointerException if one of the arguments is null
	 * @throws IOException if writing to the file system was not successful
	 */
	void dumpToFileSystem(Corpus corpus, WritingSystem ws, String fileName)
			throws IOException;
}
